// 引入 request 文件
import {
	request, saveTraffic
} from '../index.js'

// 获取轮播图数据
export function getBanner() {
	return request({
		url: '/banner?type=2',
		method: 'get'
	})
}

// 热销装备
export function findShop(pages = 1, pageSize = 10) {
	return request({
		url: `/shop/findShop?pages=${pages}&pageSize=${pageSize}`,
		method: 'get'
	})
}

// 我的装备
export function findEquipment(pages = 1, pageSize = 10, id = 4) {
	return request({
		url: `/user/shopRecord?pages=${pages}&pageSize=${pageSize}&id=${id}`,
		method: 'get'
	})
}

//推荐搭子
export function getRecomendPartnerData() {
	return saveTraffic({
		url: '/partner/recommend',
		method: 'get',
	})
}

//搭子列表
export function getPartnerList(params) {
	return request({
		url: '/partner/listAll',
		method: 'get',
		data: params
	})
}